<div class="panel-default">
  <table lay-filter="demo" lay-size='lg'>
    <thead>
      <tr>
        <% attributes.reject(&:password_digest?).each do |attribute| %>
        <th lay-data="{field:'<%= attribute.name %>'}"><%%= <%= singular_table_name.classify %>.human_attribute_name(:<%= attribute.name %>) %></th>
        <% end %>
        <th lay-data="{field:'operation',width:200}"></th>
      </tr>
    </thead>

    <tbody>
      <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
        <tr>
          <% attributes.reject(&:password_digest?).each do |attribute| %>
          <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
          <% end %>
          <td>
            <%%= link_to <%= singular_table_name %>, class: "label label-primary" do -%><i class="fa fa-file"></i><%% end %>
            <%%= link_to edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: "label label-default" do -%><i class="fa fa-pencil"></i><%% end %>
            <%%= link_to <%= singular_table_name %>, method: :delete, data: { confirm: '确定删除吗? 注意此操作无法撤销！' }, class: "label label-danger" do -%><i class="fa fa-times"></i><%% end %>
          </td>
        </tr>
      <%% end %>
    </tbody>
  </table>
  <%%= link_to new_<%= singular_table_name %>_path do -%><button type="button" class="layui-btn"><i class="layui-icon">&#xe608;</i> <%%= t('actions.new') + <%= singular_table_name.classify %>.model_name.human %></button><%% end %>
</div>



